package com.runnable2;

public class TestMyRunnable {
    public static void main(String[] args) {
//        创建自定义类对象，线程任务对象
        MyRunnable myRunnable = new MyRunnable();
        //创建线程对象
        Thread t = new Thread(myRunnable, "子线程");
        t.start();
        for (int i = 0; i < 3; i++) {
            System.out.println("主线程"+i);
        }

    }
}
